import request from '@/utils/request'

// 入库强制终止
export function forcedTermination(data) {
  return request({
    url: '/workOrder/workOrder/forcedTermination',
    method: 'post',
    data,
  })
}

// 查询入库单管理列表
export function listWorkOrder(query) {
  return request({
    url: '/workOrder/workOrder/list',
    method: 'get',
    params: query,
  })
}

// 查询入库单管理历史列表
export function listWorkOrderHistory(query) {
  return request({
    url: '/workOrder/workOrder/list/history',
    method: 'get',
    params: query,
  })
}

// 查询入库单管理详细
export function getWorkOrder(inOrderId) {
  return request({
    url: '/workOrder/workOrder/' + inOrderId,
    method: 'get',
  })
}

// 查询历史入库单管理详细
export function getWorkOrderHistory(inOrderId) {
  return request({
    url: '/workOrder/workOrder/history/' + inOrderId,
    method: 'get',
  })
}

// 新增入库单管理
export function addWorkOrder(data) {
  return request({
    url: '/workOrder/workOrder',
    method: 'post',
    data: data,
  })
}

// 修改入库单管理
export function updateWorkOrder1(data) {
  return request({
    url: '/workOrder/workOrder',
    method: 'put',
    data: data,
  })
}

// 修改入库单管理
export function updateWorkOrder(data) {
  return request({
    url: '/workOrder/workOrder/status',
    method: 'put',
    data: data,
  })
}

// 删除入库单管理
export function delWorkOrder(inOrderId) {
  return request({
    url: '/workOrder/workOrder/' + inOrderId,
    method: 'delete',
  })
}
